Repository navigation
fix(solve): say where a pin outside the hierarchy is - #42
Merged
Merged
Conversation
A pin on a package the trees carry only above or beside the solve toolchain was reported as unknown. package plan --toolchain GCCcore/15.2.0 with a stack policy pinning SciPy-bundle failed with "stack policy references unknown package SciPy-bundle", and stack solve with the same pin in a GCCcore-15.2.0 policy with "no candidates for package pin references unknown package SciPy-bundle" and "pin SciPy-bundle ==2026.05 names a package with no candidate at all". The robot has SciPy-bundle-2026.05-gfbf-2026.1.eb. The universe the provider reads is filtered to the hierarchy first, so it cannot tell a name the hierarchy lacks from a name no tree has. Both callers now check pins against the whole parsed tree before the solve, and so do stack-policy exclusions. A name the hierarchy lacks but a tree has fails with the hierarchy searched and the toolchains the trees have it on, through hierarchy::name_outside_hierarchy. A name no tree has keeps the solver's message. Which solves succeed does not change: the provider rejected every such pin before solving. Tests in hierarchy_universe.rs and bump_workflow.rs cover the two paths and fail without the fix. policy.org and new-package.org say what the failure names.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A pin on a package the trees have only outside the solve's toolchain hierarchy now names the hierarchy searched and the toolchains that have the package, instead of "unknown package".
stack solvepolicy pin, or apackage plan/package bumpstack-policy pin, failed as "unknown package" and "names a package with no candidate at all" when the trees had the name only outside the hierarchy. Both callers now check pins against the whole parsed tree before the solve, and so do stack-policy exclusions. A name no tree has keeps the solver's message. Which solves succeed does not change: the provider rejected every such pin before solving.a_version_only_pin_outside_the_hierarchy_says_where_the_package_isanda_pin_outside_the_hierarchy_says_where_the_package_iscover those. The commit has a towncrier fragment. Main has no towncrier yet; #26 (fix/towncrier) adds it.